package com.bf.xpdd.persistent.iface;

import java.sql.SQLException;
import java.util.List;

import com.bf.xpdd.domain.ActivityBean;
import com.bf.xpdd.domain.ActivityGlobal;
import com.bf.xpdd.domain.ActivityRecordBean;
import com.bf.xpdd.domain.ActivitySettingBean;
import com.bf.xpdd.domain.FrontBidRecord;
import com.bf.xpdd.domain.FrontDealRecord;
import com.bf.xpdd.domain.SiteItem;
import com.ibatis.sqlmap.client.SqlMapClient;

/**
 * 前台交互DAO
 * @author Fantastic
 * @version 1.0.0 2011-06-25
 * @since 1.0.0
 */
public interface DaoFront
{
	/**
	 * 查询活动全局信息
	 * @param sqlMapClient
	 * @param nick
	 * @return ActivityGlobal
	 * @throws SQLException
	 */
	ActivityGlobal queryActivityGlobal(SqlMapClient sqlMapClient, String nick) throws SQLException;
	
	/**
	 * 查询当前用户名下所有参与活动商品
	 * @param sqlMapClient
	 * @return
	 * @throws SQLException
	 */
	List<SiteItem> queryGobalItem(SqlMapClient sqlMapClient, String nick, int start, int end) throws SQLException;
	
	/**
	 * 查询当前活动最新的出价记录
	 * @param sqlMapClient
	 * @param nick
	 * @return
	 * @throws SQLException
	 */
	List<FrontBidRecord> queryTop5BidRecordByAct(SqlMapClient sqlMapClient, String nick, String itemId) throws SQLException;
	
	/**
	 * 查询当前活动最新的交易记录
	 * @param sqlMapClient
	 * @param nick
	 * @return
	 * @throws SQLException
	 */
	List<FrontDealRecord> queryTop5DealRecordByAct(SqlMapClient sqlMapClient, String nick, String itemId) throws SQLException;

	/**
	 * 根据商品id获取宝贝组相关信息
	 * @param sqlMapClient
	 * @param itemId
	 * @return
	 */
	ActivityBean queryActivityByItem(SqlMapClient sqlMapClient, String itemId) throws SQLException;

	/**
	 * 根据商品id获取设置信息
	 * @param sqlMapClient
	 * @param itemId
	 * @return
	 */
	ActivitySettingBean queryActivitySettingByItem(SqlMapClient sqlMapClient, String itemId) throws SQLException;

	/**
	 * 根据商品id查询成交记录信息
	 * @param sqlMapClient
	 * @param itemId
	 * @return
	 * @throws SQLException
	 */
	ActivityRecordBean queryActivityRecordInfoByItem(SqlMapClient sqlMapClient, String itemId) throws SQLException;
}
